/* TIMER.C
*
*	a collection of c-routines
*	to be called from REX to run timers within the state set
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>

main(int argc, char **argv)
{
	time_t time_of_day;
	char buf[256];
	FILE *fp;

	time_of_day = time(NULL);

   strftime(buf, 256, "%r on %A %B %d, %Y",
           localtime( &time_of_day ) );
	fp=fopen("/lab/rex/labTools/Scripts/one", "w");
   fprintf(fp, "%s\n", buf );
	fflush(fp);
   strftime(buf, 256, "%F:%H:%M",
           localtime( &time_of_day ) );
   fprintf(fp, "%s\n", buf );
	fflush(fp);
}
